/*
 * File: cf_9axis2.h
 *
 * Code generated for Simulink model 'cf_9axis2'.
 *
 * Model version                  : 1.226
 * Simulink Coder version         : 8.14 (R2018a) 06-Feb-2018
 * C/C++ source code generated on : Wed Feb 27 19:57:07 2019
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objective: Execution efficiency
 * Validation result: Not run
 */

#ifndef RTW_HEADER_cf_9axis2_h_
#define RTW_HEADER_cf_9axis2_h_
#include "rtwtypes.h"
#include <math.h>
#ifndef cf_9axis2_COMMON_INCLUDES_
# define cf_9axis2_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* cf_9axis2_COMMON_INCLUDES_ */

/* Macros for accessing real-time model data structure */
#ifndef DEFINED_TYPEDEF_FOR_accel_m_
#define DEFINED_TYPEDEF_FOR_accel_m_

typedef struct {
  real_T x;
  real_T y;
  real_T z;
} accel_m;

#endif

#ifndef DEFINED_TYPEDEF_FOR_gyro_m_
#define DEFINED_TYPEDEF_FOR_gyro_m_

typedef struct {
  real_T x;
  real_T y;
  real_T z;
} gyro_m;

#endif

#ifndef DEFINED_TYPEDEF_FOR_mag_m_
#define DEFINED_TYPEDEF_FOR_mag_m_

typedef struct {
  real_T x;
  real_T y;
  real_T z;
} mag_m;

#endif

#ifndef DEFINED_TYPEDEF_FOR_euler_
#define DEFINED_TYPEDEF_FOR_euler_

typedef struct {
  real_T roll;
  real_T pitch;
  real_T yaw;
} euler;

#endif

/* Block signals and states (default storage) for system '<Root>/cf_9axis' */
typedef struct {
  real_T mag_cross_product[3];         /* '<S15>/Sum' */
  real_T DiscreteTimeIntegrator_DSTATE[4];/* '<S7>/Discrete-Time Integrator' */
  real_T Integrator_DSTATE[3];         /* '<S3>/Integrator' */
  real_T Integrator_DSTATE_k[3];       /* '<S2>/Integrator' */
} DW_cf_9axis_cf_9axis2_T;

/* Block signals and states (default storage) for system '<Root>' */
typedef struct {
  DW_cf_9axis_cf_9axis2_T cf_9axis;    /* '<Root>/cf_9axis' */
} DW_cf_9axis2_T;

/* Block signals and states (default storage) */
extern DW_cf_9axis2_T cf_9axis2_DW;

/* Model entry point functions */
extern void cf_9axis_initialize(void);

/* Customized model step function */
extern void cf_9axis2_step(accel_m *arg_accel_m, gyro_m *arg_gyro_m, mag_m
  *arg_mag_m, euler *arg_euler);

/*-
 * These blocks were eliminated from the model due to optimizations:
 *
 * Block '<S20>/Reshape (9) to [3x3] column-major' : Reshape block reduction
 * Block '<S21>/Reshape (9) to [3x3] column-major' : Reshape block reduction
 * Block '<S33>/Reshape (9) to [3x3] column-major' : Reshape block reduction
 */

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'cf_9axis2'
 * '<S1>'   : 'cf_9axis2/cf_9axis'
 * '<S2>'   : 'cf_9axis2/cf_9axis/Discrete PID Controller'
 * '<S3>'   : 'cf_9axis2/cf_9axis/Discrete PID Controller1'
 * '<S4>'   : 'cf_9axis2/cf_9axis/Quaternions to Rotation Angles'
 * '<S5>'   : 'cf_9axis2/cf_9axis/cal_roll_pitch'
 * '<S6>'   : 'cf_9axis2/cf_9axis/cal_yaw'
 * '<S7>'   : 'cf_9axis2/cf_9axis/predict'
 * '<S8>'   : 'cf_9axis2/cf_9axis/Quaternions to Rotation Angles/Angle Calculation'
 * '<S9>'   : 'cf_9axis2/cf_9axis/Quaternions to Rotation Angles/Quaternion Normalize'
 * '<S10>'  : 'cf_9axis2/cf_9axis/Quaternions to Rotation Angles/Quaternion Normalize/Quaternion Modulus'
 * '<S11>'  : 'cf_9axis2/cf_9axis/Quaternions to Rotation Angles/Quaternion Normalize/Quaternion Modulus/Quaternion Norm'
 * '<S12>'  : 'cf_9axis2/cf_9axis/cal_roll_pitch/3x3 Cross Product'
 * '<S13>'  : 'cf_9axis2/cf_9axis/cal_roll_pitch/3x3 Cross Product/Subsystem'
 * '<S14>'  : 'cf_9axis2/cf_9axis/cal_roll_pitch/3x3 Cross Product/Subsystem1'
 * '<S15>'  : 'cf_9axis2/cf_9axis/cal_yaw/3x3 Cross Product2'
 * '<S16>'  : 'cf_9axis2/cf_9axis/cal_yaw/Rotation Angles to Direction Cosine Matrix'
 * '<S17>'  : 'cf_9axis2/cf_9axis/cal_yaw/Rotation Angles to Direction Cosine Matrix1'
 * '<S18>'  : 'cf_9axis2/cf_9axis/cal_yaw/3x3 Cross Product2/Subsystem'
 * '<S19>'  : 'cf_9axis2/cf_9axis/cal_yaw/3x3 Cross Product2/Subsystem1'
 * '<S20>'  : 'cf_9axis2/cf_9axis/cal_yaw/Rotation Angles to Direction Cosine Matrix/Create 3x3 Matrix'
 * '<S21>'  : 'cf_9axis2/cf_9axis/cal_yaw/Rotation Angles to Direction Cosine Matrix1/Create 3x3 Matrix'
 * '<S22>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix'
 * '<S23>'  : 'cf_9axis2/cf_9axis/predict/qdot'
 * '<S24>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A11'
 * '<S25>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A12'
 * '<S26>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A13'
 * '<S27>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A21'
 * '<S28>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A22'
 * '<S29>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A23'
 * '<S30>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A31'
 * '<S31>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A32'
 * '<S32>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/A33'
 * '<S33>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/Create 3x3 Matrix'
 * '<S34>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/Quaternion Normalize'
 * '<S35>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/Quaternion Normalize/Quaternion Modulus'
 * '<S36>'  : 'cf_9axis2/cf_9axis/predict/Quaternions to  Direction Cosine Matrix/Quaternion Normalize/Quaternion Modulus/Quaternion Norm'
 * '<S37>'  : 'cf_9axis2/cf_9axis/predict/qdot/Quaternion Normalize'
 * '<S38>'  : 'cf_9axis2/cf_9axis/predict/qdot/Quaternion Normalize/Quaternion Modulus'
 * '<S39>'  : 'cf_9axis2/cf_9axis/predict/qdot/Quaternion Normalize/Quaternion Modulus/Quaternion Norm'
 */
#endif                                 /* RTW_HEADER_cf_9axis2_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
